#!/usr/bin/python3
# -*- coding:utf-8 -*-
""""
   @Author: 叶建伟
   @Email: yejw46507@hundsun.com
   @Time: 2022/6/13 13:49
   @File: 非现场监管报表_新增.py
"""

import time

from 线下客户管理.线下客户共用脚本.open_menu import open_menu, arm_form_fill
from 基础公共脚本.步骤检查_hui2 import check_table, check_table_rows,FE
from 基础公共脚本.common_util import auto_fill_form,click_submit,click_cancel,click_new,click_confirm

def offsite_scene_add(input_data=None, ui_expect=None):
    open_menu({'子系统名称': '反洗钱系统', '菜单名称': '非现场监管报表/非现场监管报表'})
    # 资源设置搜索框表单填入
    time.sleep(1)
    click_new()
    auto_fill_form("报表类型",input_data)
    click_submit()
    # FE.button('xpath','//div[@class="h-modal-footer"]/p/button/span[contains(text(),"提交")]').click()
    # 检查查询结果
    check_table_rows(input_data=None, ui_expect=ui_expect)

def offsite_scene_add_cancel(input_data=None, ui_expect=None):
    open_menu({'子系统名称': '反洗钱系统', '菜单名称': '非现场监管报表/非现场监管报表'})
    # 资源设置搜索框表单填入
    time.sleep(2)
    click_new()
    auto_fill_form("报表类型",input_data)
    click_cancel()
    click_confirm()
    # 检查查询结果
    check_table_rows(input_data=None, ui_expect=ui_expect)